/*
 * @Author: wuqingchun
 * @Date: 2024-04-11 10:40:45
 * @Description: 指针和引用
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-04-11 13:20:39
 */
#include <iostream>
#include <stdio.h>

int test_pointer()
{
    int iValue = 0xa;
    int *piValue = &iValue;

    *piValue = 0xb;

    int *piOrg = &iValue;
    int **piPtr = &piValue;

    return *piValue;
}

int test_reference()
{
    int iValue = 0xa;
    int &refValue = iValue;

    refValue = 0xb;

    int *piOrg = &iValue;
    int *piRef = &refValue;

    return refValue;
}

int main(int argc, char**)
{
    test_pointer();
    test_reference();
    return 0;
}